const p1 = new Promise((resolve) => {
  const a = 'hello ';
  setTimeout(() => {
    resolve(a);
  }, 10);
});

const p2 = new Promise((resolve) => {
  const b = 'lagou ';
  setTimeout(() => {
    resolve(b);
  }, 10);
});

const p3 = new Promise((resolve) => {
  const c = 'I ❤ U';
  setTimeout(() => {
    resolve(c);
  }, 10);
});

// then 嵌套
p1.then(a => {
  p2.then(b => {
    p3.then(c => {
      console.log(a + b + c);
    });
  });
});

// async
(async function() {
  const a = await p1;
  const b = await p2;
  const c = await p3;
  console.log(a + b + c);
})();